home *** CD-ROM | disk | FTP | other *** search
- Path: gate.net!pslfl2-14
- From: bhutto@gate.net (William Hutto)
- Newsgroups: comp.lang.c
- Subject: Re: stricmp()
- Date: 11 Jan 1996 23:37:19 GMT
- Organization: CyberGate, Inc.
- Message-ID: <4d46vf$1vs0@news.gate.net>
- References: <8213293982604@demosys.gcomm.com>
- NNTP-Posting-Host: pslfl2-14.gate.net
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <8213293982604@demosys.gcomm.com>,
- jackal@gcomm.com (Jack Alvrus) wrote:
- >
- >Here's a fun question for ya':
- >
- >stricmp() is an ANSI library function, right? So it should exhibit, if
- >not consistent, at least *documented* behavior, right?
- >
- >So, is stricmp("a","^") always less than zero or greater than zero, and
- >if neither, is there any documented behavior in this case?
- >
- >I ask because '^' is *between* 'A' and 'a' in ASCII. So if stricmp()
- >always compares to upper case letters, stricmp("a","^") is always less
- >than zero. If it always compares to lower case letters,
- >stricmp("a","^") is always *greater* than zero.
- >
- >My compiler's reference manual does not say one way or another, but a
- <snip> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- You've just defined *undefined*.
-
- Bill
-
- "Whatcha got on?...Your mind?"
-